import { createRouter, createWebHashHistory } from "vue-router";

const routes = [
  {
    path: "/",
    name: "index",
    component: () => import("@/page/index/index.vue"),
  },
  {
    path: "/found",
    name: "found",
    component: () => import("@/page/found/found.vue"),
  },
  {
    path: "/publish",
    name: "publish",
    component: () => import("@/page/publish/publish.vue"),
  },
  {
    path: "/mine",
    name: "mine",
    component: () => import("@/page/mine/mine.vue"),
  },
  {
    path: "/detail",
    name: "detail",
    component: () => import("@/page/detail/detail.vue"),
  },
  {
    path: "/found",
    name: "found",
    component: () => import("@/page/found/found.vue"),
  },
  {
    path: "/query-travel",
    name: "query-travel",
    component: () => import("@/page/query-travel/travel.vue"),
  },
  {
    path: "/personal",
    name: "personal",
    component: () => import("@/page/personal/personal.vue"),
  },
  {
    //密码设置
    path: "/password",
    name: "password",
    component: () => import("@/page/password/password.vue"),
  },
  {//目的地搜索
    path: '/search-city',
    name: 'search-city',
    component: () => import('@/page/search-city/city.vue'),
    meta: {
      keepAlive: false //此页面需要缓存
    }
  },
  {//游记搜索
    path: '/search-travel',
    name: 'search-travel',
    component: () => import('@/page/search-travel/search.vue')
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
